package cn.js.sangu.unitStore.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 说明：图表统计表
 * 作者：linshuo
 * 日期：2024/10/29 9:10
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("charts")
public class Charts {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @Alias("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date creatTime;

    @Alias("折线图")
    @TableField("line")
    private JsonNode line;

    @Alias("柱状图")
    @TableField("bar")
    private JsonNode bar;

    @Alias("饼图")
    @TableField("pie")
    private JsonNode pie;



}
